// Copyright 2013 Google Inc. All Rights Reserved.auto

#include <errno.h>
#include <irt_syscalls.h>
#include <unistd.h>
#include <sys/stat.h>


int mkdir(const char *pathname, mode_t mode) {
  ENOSYS_IF_NULL(__nacl_irt_mkdir)

  size_t nwrite;
  int result = __nacl_irt_mkdir(pathname, mode);
  if (result != 0) {
    errno = __nacl_abi_errno_to_errno(result);
    return -1;
  }
  return 0;
}
